package com.cares.android.sudoku;

public class NumberTable {

	private NumberCell[][] numCells;
	
	public NumberTable() {
		this(new int[9][9]);
	}
	
	public NumberTable(int[][] numbers) {
		this(numbers, false);
	}
	
	public NumberTable(int[][] numbers, boolean fixed) {
		numCells = new NumberCell[numbers.length][numbers[0].length];
		for (int i = 0; i < numbers.length; i++) {
			for (int j = 0; j < numbers[i].length; j++) {
				numCells[i][j]= new NumberCell(numbers[i][j], fixed);
			}
		}
	}
	
	public NumberTable(NumberCell[][] numCells) {
		this.numCells = numCells;
	}
	
	public NumberCell getCell(int x, int y) {
		return numCells[x][y];
	}
	
	public void setCell(int x, int y, NumberCell cell) {
		numCells[x][y] = cell;
	}
	
	public NumberCell[][] getCells() {
		return numCells;
	}
}
